<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改信息</title>
    <link rel="stylesheet" th:href="@{/static/css/layui.css}" media="all">
</head>
<body>
    <script th:if="${session.tUser.URole eq '0'}">window.location.href="/index"</script>
    <form class="layui-form" id="addUserForm" enctype="multipart/form-data" style="margin-top: 20px;padding-left: 60px">

        <input type="hidden" class="uId" name="uId" th:value="${user.UId}">

        <div class="layui-form-item">
            <label class="layui-form-label">用户账号</label>
            <div class="layui-input-inline">
                <input type="text" name="uAccount" th:value="${user.UAccount}" id="account" disabled required lay-verify="required|account" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">真实姓名</label>
            <div class="layui-input-inline">
                <input type="text" name="uName" th:value="${user.UName}" required lay-verify="required|truename" placeholder="请输入您的姓名" autocomplete="off" class="layui-input uName">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <input type="radio" name="uSex" class="uSex" value="0" title="男" th:checked="${user.USex eq '0'}">
                <input type="radio" name="uSex" class="uSex" value="1" title="女" th:checked="${user.USex eq '1'}">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">出生日期</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" th:value="${#dates.format(user.UBirthday,'yyyy-MM-dd')}" name="uBirthday" id="birthday" autocomplete="off" placeholder="yyyy-MM-dd">
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">联系方式</label>
            <div class="layui-input-inline">
                <input type="text" name="uPhone" required lay-verify="required|phones" th:value="${user.UPhone}" placeholder="请输入手机号" autocomplete="off" class="layui-input uPhone">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-inline">
                <input type="text" name="uEmail" required lay-verify="required|email" th:value="${user.UEmail}" placeholder="请输入邮箱" autocomplete="off" class="layui-input uEmail">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <div class="layui-upload">
                    <button type="button" class="layui-btn" id="upload"><i class="layui-icon">&#xe67c;</i>上传图片</button>
                    <input type="hidden" id="uIco" name="uIco" th:value="${user.UIco}"/>
                    <img class="layui-upload-img" width="100px" height="80px" id="demo1" th:src="@{${user.UIco}}" />
                    <p id="demoText"></p>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo" id="butt">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>

    <script type="text/javascript" th:src="@{/static/js/jquery-3.2.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/static/layui.js}"></script>
    <script type="text/javascript" th:src="@{/static/js/mouseClick.js}"></script>
    <script type="text/javascript" th:src="@{/static/js/validation.js}"></script>
    <script type="text/javascript" th:src="@{/static/js/admin/updateOther.js}"></script>
    <script type="text/javascript" th:src="@{/static/js/user/upload.js}"></script>
</body>
</html>